import request from '@/utils/request';
//获取部门列表
export function getDepartmentList() {
  return request({
    url: '/department/v1/department-service/hierarchy',
    method: 'get',
  });
}

//新增部门
export function addDepartment(data) {
  return request({
    url: '/department/v1/department-service/add',
    method: 'post',
    data
  });
}
//删除部门
export function deleteDepartment(id) {
  return request({
    url: '/department/v1/department-service/delete/' + id,
    method: 'delete'
  });
}
//修改部门
export function updateDepartment(data) {
  return request({
    url: '/departmentv1/department-service/update',
    method: 'put',
    data
  });
}
